package com.qingcloud.adminbackend.controller;


import com.qingcloud.adminbackend.base.AjaxResult;
import com.qingcloud.adminbackend.constant.WamingConstant;
import com.qingcloud.adminbackend.entity.aline.AlinePageDTO;
import com.qingcloud.adminbackend.entity.aline.AlinePageVO;
import com.qingcloud.adminbackend.service.ISysSensorAlineService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 * 传感器数据校准表(网格化设备) 前端控制器
 * </p>
 *
 * @author liuziyong
 * @since 2019-04-12
 */
@RestController
@RequestMapping("/sys/sensor/aline")
public class SysSensorAlineController {


    @Resource
    private ISysSensorAlineService sysSensorAlineService;

    @ApiOperation(value = "参数校准分页查询(网格化)", notes = "参数校准分页查询(网格化)", response = AlinePageVO.class)
    @PostMapping("/findPage")
    public AjaxResult page(@RequestBody AlinePageDTO alinePageDTO, HttpServletRequest request){
        //alinePageDTO.setUserId(CookieUtil.getUserId(request));
        return new AjaxResult(WamingConstant.SUCCESS, null, sysSensorAlineService.page(alinePageDTO));
    }

}

